<?php
/**
 * Created by PhpStorm.
 * User: Administrator
 * Date: 2017/9/19
 * Time: 16:22
 */
$name= 10;
$age= 9;
var_dump($GLOBALS);
function foo(){
    var_dump($GLOBALS['name']);
    var_dump($GLOBALS['age']);
    $GLOBALS['name'] = 'frank';
}
foo();
var_dump($name);